package com.xbongbong.pro.performanceset.pojo.dto;

import com.xbongbong.paas.pojo.IdNamePojo;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @description: 引导页（一次性保存多项设置）
 * @Author: hongxiao
 * @date: 2019-01-30 13:49
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class PerformanceSetSaveGuideDTO extends BaseDTO {
    /**
     * 启用的指标ids
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.idIn.NotNull}")
    @Size(min = 1,message = "{dto.msg.performanceSetSaveGuide.idIn.Size}")
    List<Long> idIn;
    /**
     * 考核对象
     */
    List<IdNamePojo> permissions;
    /**
     * 财年起始月
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.startMonth.NotNull}")
    @Min(value = 1, message = "{dto.msg.performanceSetSaveGuide.startMonth.Min}")
    @Max(value = 12, message = "{dto.msg.performanceSetSaveGuide.startMonth.Max}")
    Integer startMonth;
    /**
     * 月工作日天数
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.workingDayMonth.NotNull}")
    @Min(value = 1, message = "{dto.msg.performanceSetSaveGuide.workingDayMonth.Min}")
    @Max(value = 30, message = "{dto.msg.performanceSetSaveGuide.workingDayMonth.Max}")
    Double workingDayMonth;
    /**
     * 周工作日天数
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.workingDayWeek.NotNull}")
    @Min(value = 1, message = "{dto.msg.performanceSetSaveGuide.workingDayWeek.Min}")
    @Max(value = 7, message = "{dto.msg.performanceSetSaveGuide.workingDayWeek.Max}")
    Double workingDayWeek;
    /**
     * 允许员工在移动端设置个人目标
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.enablePerformance.NotNull}")
    @Min(value = 0, message = "{dto.msg.performanceSetSaveGuide.enablePerformance.Min}")
    @Max(value = 1, message = "{dto.msg.performanceSetSaveGuide.enablePerformance.Max}")
    Integer enablePerformance;
    /**
     * 允许主管及以上角色在移动端设置目标
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.enablePerformanceManage.NotNull}")
    @Min(value = 0, message = "{dto.msg.performanceSetSaveGuide.enablePerformanceManage.Min}")
    @Max(value = 1, message = "{dto.msg.performanceSetSaveGuide.enablePerformanceManage.Max}")
    Integer enablePerformanceManage;
    /**
     * 上级部门目标自动汇总
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.enableAggDepartmentPerfor.NotNull}")
    @Min(value = 0, message = "{dto.msg.performanceSetSaveGuide.enableAggDepartmentPerfor.Min}")
    @Max(value = 1, message = "{dto.msg.performanceSetSaveGuide.enableAggDepartmentPerfor.Max}")
    Integer enableAggDepartmentPerfor;
    /**
     * 当考核方式为"固定数值"的时候，汇总离职员目标
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.enableFixedLeaveMark.NotNull}")
    @Min(value = 0, message = "{dto.msg.performanceSetSaveGuide.enableFixedLeaveMark.Min}")
    @Max(value = 1, message = "{dto.msg.performanceSetSaveGuide.enableFixedLeaveMark.Max}")
    Integer enableFixedLeaveMark;
    /**
     * 业绩目标是否显示离职员工
     */
    @NotNull(message = "{dto.msg.performanceSetSaveGuide.enablePerformanceLeave.NotNull}")
    @Min(value = 0, message = "{dto.msg.performanceSetSaveGuide.enablePerformanceLeave.Min}")
    @Max(value = 1, message = "{dto.msg.performanceSetSaveGuide.enablePerformanceLeave.Max}")
    Integer enablePerformanceLeave;
}
